﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ucAddItem.ascx.cs" Inherits="Admin_UserControl_ucAddItem" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit.HTMLEditor"
    TagPrefix="cc1" %>
<h1>
    <asp:Label ID="lbltitle" runat="server"></asp:Label></h1>
<br>
<div style="font-size: medium">
    <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/Admin/ListItems.aspx">Quay lại</asp:HyperLink>
</div>
<br />
<table border="0" width="100%" cellpadding="0" cellspacing="0">
    <tr valign="top">
        <td>
            <table border="0" cellpadding="0" cellspacing="0" id="id-form">
                <tr>
                    <th valign="top">
                        Tên sản phẩm:
                    </th>
                    <td>
                        <asp:TextBox ID="txtItemName" runat="server" CssClass="inp-form"></asp:TextBox>
                        <%--<input type="text" class="inp-form" />--%>
                    </td>
                    <td>
                    </td>
                </tr>
                <tr>
                    <th valign="top">
                        Danh mục:
                    </th>
                    <td>
                        <asp:DropDownList ID="drCategory" runat="server" CssClass="styledselect_form_1">
                        </asp:DropDownList>
                        <%--<select class="styledselect_form_1">
                                                    <option value="">All</option>
                                                    <option value="">Products</option>
                                                    <option value="">Categories</option>
                                                    <option value="">Clients</option>
                                                    <option value="">News</option>
                                                </select>--%>
                    </td>
                    <td>
                    </td>
                </tr>
                <%--<tr>
                                            <th valign="top">
                                                Sub Category:
                                            </th>
                                            <td>
                                                <select class="styledselect_form_1">
                                                    <option value="">All</option>
                                                    <option value="">Products</option>
                                                    <option value="">Categories</option>
                                                    <option value="">Clients</option>
                                                    <option value="">News</option>
                                                </select>
                                            </td>
                                            <td>
                                            </td>
                                        </tr>--%>
                <tr>
                    <th valign="top">
                        Mã sản phẩm
                    </th>
                    <td>
                        <asp:TextBox ID="txtNumber" CssClass="inp-form" runat="server"></asp:TextBox>
                    </td>
                    <td>
                    </td>
                </tr>
                <tr>
                    <th valign="top">
                        Trạng trái:
                    </th>
                    <td>
                        <asp:DropDownList ID="drInactive" runat="server" CssClass="styledselect_form_1">
                            <asp:ListItem Value="0">No</asp:ListItem>
                            <asp:ListItem Value="1">Yes</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                    <td>
                    </td>
                </tr>
                <tr>
                    <th valign="top">
                        Mô tả:
                    </th>
                    <td style="width: 0%">
                        <%--<asp:TextBox ID="txtDes" runat="server" TextMode="MultiLine" CssClass="form-textarea"></asp:TextBox>--%>
                        <cc1:Editor ID="txtDes" runat="server" AutoFocus="true" Height="300px" NoUnicode="True" />
                    </td>
                    <td style="width: 120px">
                        <asp:HyperLink ID="hypDetails" runat="server">Chi tiết sản phẩm</asp:HyperLink>
                    </td>
                </tr>
                <tr>
                    <th valign="top">
                        Giá:
                    </th>
                    <td>
                        <asp:TextBox ID="txtPrice" CssClass="inp-form" runat="server"></asp:TextBox>
                    </td>
                    <td>
                    </td>
                </tr>
                <tr>
                    <th>
                        <asp:Label ID="lblImage" runat="server" Text="Hình"></asp:Label>
                    </th>
                    <td>
                        
                        <asp:Label ID="Label1" runat="server" Text="  JPEG, GIF 5MB tối đa cho mỗi hình ảnh" 
                            Enabled="False"></asp:Label>
                        <br />
                        <asp:Label ID="lblMessage" runat="server" ForeColor="Red"></asp:Label>
                    </td>
                    <td>
                        &nbsp;</td>
                </tr>
                <tr>
                    <th>
                        &nbsp;
                    </th>
                    <td valign="top">
                        <asp:Button ID="btnSubmit" runat="server" CssClass="form-submit" OnClick="btnSubmit_Click" />
                        <asp:Button ID="btnReset" runat="server" CssClass="form-reset" OnClick="btnReset_Click" />
                    </td>
                    <td>
                    </td>
                </tr>
            </table>
            <!-- end id-form  -->
        </td>
        <td>
            <asp:FileUpload ID="fileUpload" runat="server" Width="220px" />
        <asp:Button ID="btnUpload" runat="server" Text="Upload" onclick="btnUpload_Click" />
            <asp:GridView ID="grdImgItems" runat="server" AutoGenerateColumns="False" Width="500px"
                EmptyDataText="No images found" OnRowDataBound="grdImgItems_RowDataBound">
                <Columns>
                    <asp:ImageField HeaderText="Hình" DataImageUrlField="ImageURL" DataImageUrlFormatString="~/Admin/Images/Items/{0}">
                        <ControlStyle Height="80px" />
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:ImageField>
                    <asp:TemplateField HeaderText="Mặc định">
                        <ItemTemplate>
                            <asp:CheckBox ID="chkDefault" runat="server" Enabled="false" />&nbsp;
                            <asp:ImageButton ID="btnDefault" runat="server" ImageUrl="~/Admin/images/table/btnDefault.jpg"
                                OnClick="btnDefault_Click" />
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Xóa">
                        <ItemTemplate>
                            <asp:ImageButton ID="btnDelImg" runat="server" CausesValidation="false" CommandName="delete"
                                CommandArgument='<%# Eval("ID") %>' ImageUrl="~/Admin/images/table/del.gif" OnClick="btnDelImg_Click" />
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:TemplateField>
                </Columns>
                <PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue" HorizontalAlign="Center" />
                <EmptyDataTemplate>
                    Không có hình ảnh được tìm thấy
                </EmptyDataTemplate>
                <SelectedRowStyle BackColor="DarkSlateBlue" ForeColor="GhostWhite" />
                <HeaderStyle BackColor="Tan" Height="30px" Font-Bold="True" />
                <AlternatingRowStyle BackColor="PaleGoldenrod" />
            </asp:GridView>
        </td>
    </tr>
    <tr>
        <td>
            <img src="images/shared/blank.gif" width="695" height="1" alt="blank" />
        </td>
        <td>&nbsp;</td>
    </tr>
</table>
